package com.example.server.vo;

import com.example.server.service.CartItemService;
import com.example.server.service.CartService;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@Component
public class DeleteCart {
    private final CartService cartService;
    private final CartItemService cartItemService;

    public DeleteCart(CartService cartService, CartItemService cartItemService) {
        this.cartService = cartService;
        this.cartItemService = cartItemService;
    }

    public void delete(int id){
        cartItemService.removeById(id);
        int num = cartItemService.queryNum("queryCount",id);
    }
}
